﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parlez.Attributes
{
    public class ParlezDisplayAttribute : DisplayNameAttribute
    {
        public ParlezDisplayAttribute(string LanguageKey, string DefaultValue)
            : base(GetLanguageItem(LanguageKey, DefaultValue))
        {

        }

        private static string GetLanguageItem(string LanguageKey, string DefaultValue)
        {
            Parlez.LanguageSelectors.LanguageSelector _Selector_ILanguageSelector = LanguageSelectors.LanguageSelectorFactory.GetLanguageSelector();

            return _Selector_ILanguageSelector.GetLanguageItem(LanguageKey, DefaultValue);
        }
    }
}
